.class Lcom/waiqin365/lightapp/im/gallery/a/d;
.super Ljava/lang/Object;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/im/gallery/a/a;

.field private b:Ljava/util/HashMap;


# direct methods
.method public constructor <init>(Lcom/waiqin365/lightapp/im/gallery/a/a;)V
    .locals 1

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/gallery/a/d;->a:Lcom/waiqin365/lightapp/im/gallery/a/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/a/d;->b:Ljava/util/HashMap;

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/gallery/a/d;)Ljava/util/HashMap;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/a/d;->b:Ljava/util/HashMap;

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;
    .locals 6

    const/4 v0, 0x0

    new-instance v1, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v1}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/gallery/a/d;->a:Lcom/waiqin365/lightapp/im/gallery/a/a;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/gallery/a/a;->c(Lcom/waiqin365/lightapp/im/gallery/a/a;)Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    :try_start_0
    invoke-static {p2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v4

    const/4 v3, 0x3

    invoke-static {v2, v4, v5, v3, v1}, Landroid/provider/MediaStore$Images$Thumbnails;->getThumbnail(Landroid/content/ContentResolver;JILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    move-result-object v0

    :goto_0
    if-nez v0, :cond_0

    const/4 v2, 0x1

    :try_start_1
    iput-boolean v2, v1, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    invoke-static {p1, v1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    const/4 v2, -0x1

    const/16 v3, 0x2710

    invoke-static {v1, v2, v3}, Lcom/waiqin365/compons/camera/b/b;->a(Landroid/graphics/BitmapFactory$Options;II)I

    move-result v2

    iput v2, v1, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I

    const/4 v2, 0x0

    iput-boolean v2, v1, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    new-instance v2, Ljava/io/FileInputStream;

    invoke-direct {v2, p1}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/FileInputStream;->getFD()Ljava/io/FileDescriptor;

    move-result-object v2

    const/4 v3, 0x0

    invoke-static {v2, v3, v1}, Landroid/graphics/BitmapFactory;->decodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v0

    :cond_0
    :goto_1
    new-instance v1, Landroid/graphics/drawable/BitmapDrawable;

    invoke-direct {v1, v0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V

    return-object v1

    :catch_0
    move-exception v1

    goto :goto_1

    :catch_1
    move-exception v2

    goto :goto_0
.end method

.method public a(Ljava/lang/String;Ljava/lang/String;Lcom/waiqin365/lightapp/im/gallery/a/g;)Landroid/graphics/drawable/Drawable;
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/a/d;->b:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/a/d;->b:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/ref/SoftReference;

    invoke-virtual {v0}, Ljava/lang/ref/SoftReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/Drawable;

    if-eqz v0, :cond_0

    :goto_0
    return-object v0

    :cond_0
    new-instance v0, Lcom/waiqin365/lightapp/im/gallery/a/e;

    invoke-direct {v0, p0, p3, p1}, Lcom/waiqin365/lightapp/im/gallery/a/e;-><init>(Lcom/waiqin365/lightapp/im/gallery/a/d;Lcom/waiqin365/lightapp/im/gallery/a/g;Ljava/lang/String;)V

    new-instance v1, Lcom/waiqin365/lightapp/im/gallery/a/f;

    invoke-direct {v1, p0, p1, p2, v0}, Lcom/waiqin365/lightapp/im/gallery/a/f;-><init>(Lcom/waiqin365/lightapp/im/gallery/a/d;Ljava/lang/String;Ljava/lang/String;Landroid/os/Handler;)V

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/im/gallery/a/f;->start()V

    const/4 v0, 0x0

    goto :goto_0
.end method
